package flc.ast.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import flc.ast.R;
import flc.ast.activity.CameraActivity;
import flc.ast.activity.RecordActivity;
import flc.ast.activity.SelPicActivity;
import flc.ast.databinding.FragmentCaricatureBinding;
import flc.ast.utils.Content;
import stark.common.basic.base.BaseNoModelFragment;
import stark.common.basic.event.EventStatProxy;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link CaricatureFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class CaricatureFragment extends BaseNoModelFragment<FragmentCaricatureBinding> {


    @Override
    protected int onCreate() {
        return R.layout.fragment_caricature;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent1(getActivity(), mDataBinding.event1Container);
        EventStatProxy.getInstance().statEvent5(getActivity(), mDataBinding.event5Container);
        mDataBinding.ivCaricature.setOnClickListener(this);
        mDataBinding.ivCamera.setOnClickListener(this);
        mDataBinding.ivRecord.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()) {
            case R.id.ivCaricature://图片转漫画
                startActivity(SelPicActivity.class);
                break;
            case R.id.ivCamera://拍照转漫画
                startActivity(CameraActivity.class);
                break;
            case R.id.ivRecord://历史记录
                RecordActivity.sFilePath = Content.MyCaricatureRecord;
                startActivity(RecordActivity.class);
                break;
        }
    }

    @Override
    protected void initData() {

    }
}